﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

using Microsoft.Practices.Unity;
using ePlanet.ArchiveMange.Services;

namespace Web.Views.ArchiveFlowView
{
    public partial class ArchiveViewDeptDonePage : System.Web.UI.Page
    {
        #region 属性
        /// <summary>
        /// 文档类型ID
        /// </summary>
        public int ArchiveTypeID
        {
            get
            {
                int o_int = 0;
                if (Request.QueryString["archivetype"] != null)
                {
                    if (int.TryParse(Request.QueryString["archivetype"], out o_int))
                    {
                        return o_int;
                    }
                    else
                    {
                        throw new Exception("档案类型错误");
                    }
                }
                else
                {
                    throw new Exception("档案类型不能为空");
                }
            }
        }

        [Dependency]
        public IArchiveMenuService ArchiveMenuService
        {
            get;
            set;
        }
        #endregion

        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                this.archiveTypeId.Value = this.ArchiveTypeID.ToString();
                string urlFormat = "../SystemLogin/loadingpage.aspx?Menu_URL=../ArchiveFlowView/{0}?archiveType={1}";
                this.Response.Redirect(string.Format(urlFormat, "ArchiveDeptDoneList.aspx", ArchiveTypeID));
            }
        }
    }
}